package com.fang.mmy.items.feign;

import com.fang.mmy.entity.ResponseResult;
import com.fang.mmy.entity.User;
import com.fang.mmy.items.config.OpenFeignConfig;
import com.fang.mmy.items.feign_handler.UserFeignHandler;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @ClassName UserFeign
 * @Author kebukeyi
 * @Date 2022/8/7 10:39
 * @Description
 * @Version 1.0.0
 */
@FeignClient(value = "fang-mmy-user", fallback = UserFeignHandler.class, configuration = OpenFeignConfig.class)
@Component
public interface UserFeign {

    @GetMapping("user/getUserNo")
    ResponseResult<User> getUserNo(@RequestParam Long userId);

}
